package com.yhp.service.impl;

import com.yhp.bean.Student;
import com.yhp.dao.StudentDao;
import com.yhp.dao.impl.StudentDaoImpl;
import com.yhp.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao=new StudentDaoImpl();

    @Override
    public List<Student> getall(int pageindex,int pagesize,String stuname,String stuno,int sex) {
        return studentDao.getall(pageindex,pagesize,stuname,stuno,sex);
    }

    @Override
    public int totalcount(String stuname,String stuno,int sex) {
        return studentDao.totalcount(stuname,stuno,sex);
    }

    @Override
    public int insertStu(Student student) {
        return studentDao.insertStu(student);
    }

    @Override
    public int del(String sid) {
        return studentDao.del(sid);
    }

    @Override
    public Student findbyid(String sid) {
        return studentDao.findbyid(sid);
    }

    @Override
    public int updatestu(Student student) {
        return studentDao.updatestu(student);
    }

}
